<template>
    <div class="main">
        <div class="cardCenter" v-for="card in data" :key="card.aid">
            <a href="#">
                <div class="TuPian">

                    <img v-bind:src="url+card.src">
                </div>
                <div class="cardWord">
                    <div class="titles"><span>{{card.title}}</span></div>
                    <h4>{{card.h4}}</h4>
                    <p>{{card.p}}</p>
                    <span>{{card.span}}</span>
                </div>
            </a>
        </div>
    </div>
</template>

<script>
export default {
    mounted() {
        this.axios.get('v1/activeQuery').then(res => {
            console.log(res);
            this.data = res.data.data
        })
    },
    props: [],
    data() {
        return {
            data: [],
            url: 'http://176.19.26.136:3000/',
        }
    },
}
</script>

<style lang="scss" scoped>
a {
    text-decoration: none;
}

.main {
    display: flex;
    flex-wrap: wrap;

    .cardCenter {
        margin: 20px;
        height: 390px;
        width: 450px;
        background: #fff;
        border-radius: 25px;
        overflow: hidden;
        display: flex;

        .TuPian {


            img {
                width: 100%;
            }
        }

        .cardWord {
            height: 120px;
            width: 100%;
            float: left;
            padding: 20px;
            position: relative;

            .titles {
                transform: translate(1px, -250px);
                width: 88px;
                height: 29px;
                background: #BA3D7F;

                border-radius: 25px;

                span {
                    color: #fff;
                    margin: 0 20px;
                }
            }

            h4 {
                color: #000;
            }

            h4:hover {
                color: #a96c15;
            }

            p {
                color: #737373;
                margin: 10px;
            }

            span {
                color: #999;
                font-size: 12px;
                margin: 10px;
            }
        }
    }
}
</style>